import { DEL_TOKEN, SET_TOKEN } from '../actionTypes'

const initState = ''
export default function login (state = initState, { type, payload }) {
  console.log(type, payload)
  if (type === SET_TOKEN) {
    return payload
  } else if (type === DEL_TOKEN) {
    return null
  }
  return state
}
